package com.dks.repository.impl;

import java.util.*;

import com.dks.mapper.CourseCategoryMapper;
import com.dks.models.CourseCategory;
import com.dks.repository.ICourseCategoryRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class CourseCategoryRepository implements ICourseCategoryRepository {

    private CourseCategoryMapper courseCategoryMapper;

    @Autowired
    public CourseCategoryRepository(final CourseCategoryMapper courseCategoryMapperIn) {
        this.courseCategoryMapper = courseCategoryMapperIn;
    }

    @Override
    public Integer insert(CourseCategory courseCategory){
        return courseCategoryMapper.insert(courseCategory);
    }

    @Override
    public Integer update(CourseCategory courseCategory){
        return courseCategoryMapper.update(courseCategory);
    }

    @Override
    public Integer delete(Integer id){
        return courseCategoryMapper.delete(id);
    }

    @Override
    public CourseCategory select(Integer id){
        return courseCategoryMapper.select(id);
    }

    @Override
    public Integer cntByMap(Map<String,Object> map){
        return courseCategoryMapper.cntByMap(map);
    }

    @Override
    public List<Integer> getByMap(Map<String,Object> map){
        return courseCategoryMapper.getByMap(map);
    }

    @Override
    public List<CourseCategory> getByMapList(Map<String,Object> map){
        return courseCategoryMapper.getByMapList(map);
    }

    @Override
    public Integer updateByCode(CourseCategory courseCategory){
        return courseCategoryMapper.updateByCode(courseCategory);
    }

    @Override
    public CourseCategory selectByBfCode(String bfCode){
        return courseCategoryMapper.selectByBfCode(bfCode);
    }
}
